package top.lyjwn.todo.weinxin.param;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.io.InputStream;

@Component
@ConfigurationProperties(prefix = "winxin.mch")
public class MchProperties {


    /**
     * api密钥,账户设置-->API安全-->密钥设置
     */
    private String api_key;
    /**
     * 微信支付分配的appid
     */
    private String appid;

    /**
     * 商户私钥（商户API证书apiclient_key.pem文件内容） privateKey
     */
    //public final static PrivateKey PRIVATE_KEY = PemUtil.loadPrivateKey(SSLUilt.class.getResourceAsStream("/apiclient_key.pem"));

    /**
     * 微信支付的,ca证书
     */
    private InputStream ssl_key;

    /**
     * 微信支付的,ca证书,16进制证书码
     */
    private String cert_code;

    /**
     * 商户号
     */
    private String mch_id;

    /**
     * 系统域名
     */
    private String domain_name;

    /**
     * 授权域名
     */
    private String authDomainName;

    /**
     * 商户API证书序列号
     */
    private String mchSeriaLno;


    /**
     * 平台证书（通过CertificateDownloader下载的证书文件内容）
     */
    private String certificate;


    public String getApi_key() {
        return api_key;
    }

    public void setApi_key(String api_key) {
        this.api_key = api_key;
    }

    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public InputStream getSsl_key() {
        return ssl_key;
    }

    public void setSsl_key(InputStream ssl_key) {
        this.ssl_key = ssl_key;
    }

    public String getCert_code() {
        return cert_code;
    }

    public void setCert_code(String cert_code) {
        this.cert_code = cert_code;
    }

    public String getMch_id() {
        return mch_id;
    }

    public void setMch_id(String mch_id) {
        this.mch_id = mch_id;
    }

    public String getDomain_name() {
        return domain_name;
    }

    public void setDomain_name(String domain_name) {
        this.domain_name = domain_name;
    }

    public String getAuthDomainName() {
        return authDomainName;
    }

    public void setAuthDomainName(String authDomainName) {
        this.authDomainName = authDomainName;
    }

    public String getMchSeriaLno() {
        return mchSeriaLno;
    }

    public void setMchSeriaLno(String mchSeriaLno) {
        this.mchSeriaLno = mchSeriaLno;
    }

    public String getCertificate() {
        return certificate;
    }

    public void setCertificate(String certificate) {
        this.certificate = certificate;
    }
}
